import sys
sys.path.insert(0, './')

import argparse
from reader.Reader_landmark_config import Config
from utils.Engine import testEngine
from pprint import pformat
import logging


def parser_args():
    parser = argparse.ArgumentParser(description="landmark test project")
    parser.add_argument('--cfg', type=str, default='./cfg/resnet18_pts17_test.yml', help='config file')
    parser.add_argument('--train_flag', type=bool, default=False)
    args = parser.parse_args()
    return args

if __name__ == '__main__':
    args = parser_args()

    config = Config(args).get_config()
    logging.info('Config\n\n%s\n' % pformat(config))

    engine = testEngine(config)
    engine.test()